feat: configuration and setup#14
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces foundational infrastructure for the GavaConnect SDK including configuration management, structured error handling, and SDK versioning to establish a more robust and maintainable codebase.
- Added configuration classes (
SDKConfig,RetryPolicy) for managing SDK settings like timeouts and retry behavior - Introduced a comprehensive error hierarchy with custom exception classes for different failure scenarios
- Established SDK versioning with a dedicated version module and exposed it in the public API
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Added type hint support marker and enhanced linting configuration |
| gavaconnect/errors.py | New error hierarchy with custom exception classes for structured error handling |
| gavaconnect/config.py | Configuration dataclasses for SDK settings including timeouts and retry policies |
| gavaconnect/_version.py | Dedicated version module with release-please integration |
| gavaconnect/init.py | Updated public API exports to include new configuration, error classes, and version |
Comments suppressed due to low confidence (1)
gavaconnect/errors.py:1
- The import statement references
SerializationErrorclass which is defined in the errors module but is missing from this import statement and the__all__list in__init__.py.
"""
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces configuration and error handling infrastructure to the GavaConnect SDK, as well as SDK versioning and some packaging improvements. The most significant changes are the addition of new modules for configuration and error classes, and the exposure of these new components in the SDK's public API.
New configuration and error handling modules:
config.pymodule that definesSDKConfigandRetryPolicydataclasses for SDK configuration, including timeouts and retry policies. (gavaconnect/config.py)errors.pymodule with custom exception classes:SDKError,TransportError,SerializationError,APIError, andRateLimitErrorfor structured error handling throughout the SDK. (gavaconnect/errors.py)SDK versioning and public API:
_version.pymodule with a__version__string, and exposed this version in the SDK's public API. (gavaconnect/_version.py,gavaconnect/__init__.py) [1] [2]__all__list ingavaconnect/__init__.pyto include the new configuration and error classes, as well as the version string, making them available to SDK consumers. (gavaconnect/__init__.py)Packaging improvements:
py.typedto the package data inpyproject.tomlto indicate type hint support for consumers. (pyproject.toml)pyproject.tomlto improve code quality checks. (pyproject.toml)